package com.ajie.controller;

import com.ajie.entity.Comment;
import com.ajie.entity.FeedBack;
import com.ajie.service.FeedBackService;
import com.ajie.utils.DateUtils;
import com.ajie.utils.QueryInfo;
import com.ajie.utils.Result;
import com.ajie.utils.SecurityUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "反馈模块")
@RequestMapping("/feedback")
@Slf4j
public class FeedBackController {
    
    @Autowired
    private FeedBackService feedBackService;
    
    @ApiOperation(value = "添加反馈")
    @PostMapping("/addFeedBack")
    public Result addFeedBack(@RequestBody FeedBack feedBack){
        log.info("该文件名是：FeedBackController,该方法是：addFeedBack");
        return feedBackService.addFeedBack(feedBack);
    }
    
    @ApiOperation(value = "添加反馈")
    @PostMapping("/findPage")
    public Result findPage(@RequestBody QueryInfo queryInfo){
        log.info("该文件名是：FeedBackController,该方法是：findPage");
        return feedBackService.findPage(queryInfo);
    }
    
    @ApiOperation(value = "添加反馈")
    @DeleteMapping("/delete/{id}")
    public Result delete(@PathVariable("id") Long id){
        log.info("该文件名是：FeedBackController,该方法是：findPage");
        return feedBackService.delete(id);
    }
}
